﻿#include "CmdThreeDCloudMapSidebarItemCheckStateChanged.h"
#include <QFile>
#include <QDebug>
#include "BaseModule/IBaseSignal.h"
#include "PostCommandPy.h"

namespace PostCommand
{
    CmdThreeDCloudMapSidebarItemCheckStateChanged::CmdThreeDCloudMapSidebarItemCheckStateChanged()
        : CommandBase()
    {
        this->initCmdName();
    }
    CmdThreeDCloudMapSidebarItemCheckStateChanged::~CmdThreeDCloudMapSidebarItemCheckStateChanged()
    {
    }

    bool CmdThreeDCloudMapSidebarItemCheckStateChanged::execute()
    {
        // bool _success = false;
        emit IBaseSignalInstance->signal_threeDCloudMapSidebarItemCheckStateChanged(m_windowId, m_itemIndex, m_visible);
        return true;
    }

    void CmdThreeDCloudMapSidebarItemCheckStateChanged::undo()
    {
    }

    void CmdThreeDCloudMapSidebarItemCheckStateChanged::redo()
    {
        // execute();
    }

    void CmdThreeDCloudMapSidebarItemCheckStateChanged::setThreeDCloudMapSidebarItemCheckStateChanged(int windowId, int itemIndex, bool visible)
    {
        m_windowId = windowId;
        m_itemIndex = itemIndex;
        m_visible = visible;
    }

} // namespace PostCommand
